<?
// print_r($_POST);exit;
//引用页面 ali_refund 用来异步查询订单状态
include_once '/var/www/html/new/com.inc.php';
$ac=$GLOBALS['_ac'];
$pw=$GLOBALS['_pw'];
$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
switch($_POST['action']){
    case 'order_status';
        $x =  simplexml_load_string($s->Order_Globle_Search( "","", "", "", "", "", "", "", "", "","", "", $_POST['ordernum'], "", "", "", "", "", "0", "0","0", "1", "0", "0","","0","","0","","","","","","0","0","0"));
        // print_r($x);
        $status=(string)$x->Rec->UUstatus;
         switch($status){
            case '0':
                $r = '未使用';
                break;
            case '1':
                $r = '已使用';
                break;
            case '2':
                $r = '已过期';
                break;
            case '3':
                $r = '被取消';
                break;
            case '4':
                $r = '凭证码被替代';
                break;
            case '5':
                $r = '被终端修改';
                break;
            case '6':
                $r = '被终端撤销';
                break;
            case '7':
                $r = '部分使用';
                break;
            default:
                break;            
         }
        echo '{"status":"'.$r.'"}';
        break;
    default :
        break;

}
?>